﻿using System;

namespace XXX.Models.AS
{
    /// <summary>
    /// 写入U8用的类
    /// </summary>
    public class AS_Computation
    {
        public string cComunitCode { get; set; }
        public bool ShouldSerialivecComunitCode() => !string.IsNullOrEmpty(cComunitCode);

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:False
        /// </summary>           
        public string cComUnitName { get; set; }
        public bool ShouldSerialivecComUnitName() => !string.IsNullOrEmpty(cComUnitName);

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string cGroupCode { get; set; }
        public bool ShouldSerialivecGroupCode() => !string.IsNullOrEmpty(cGroupCode);

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string cBarCode { get; set; }
        public bool ShouldSerialivecBarCode() => !string.IsNullOrEmpty(cBarCode);

        /// <summary>
        /// Desc:
        /// Default:0
        /// Nullable:False
        /// </summary>           
        public bool bMainUnit { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public decimal? iChangRate { get; set; }
        public bool ShouldSerializeiChangRate() => iChangRate.HasValue;

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public double? iProportion { get; set; }
        public bool ShouldSerializeiProportion() => iProportion.HasValue;

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public short? iNumber { get; set; }
        public bool ShouldSerializeiNumber() => iNumber.HasValue;

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string cEnSingular { get; set; }
        public bool ShouldSerialivecEnSingular() => !string.IsNullOrEmpty(cEnSingular);

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string cEnPlural { get; set; }
        public bool ShouldSerialivecEnPlural() => !string.IsNullOrEmpty(cEnPlural);

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string cUnitRefInvCode { get; set; }
        public bool ShouldSerialivecUnitRefInvCode() => !string.IsNullOrEmpty(cUnitRefInvCode);
    }
}